package mvc.control
{
	import com.adobe.cairngorm.control.FrontController;
	
	import mvc.command.armory.EquipAllSlotsCmd;
	import mvc.command.armory.EquipOneSlotCmd;
	import mvc.command.armory.SearchOptionalItemCmd;
	import mvc.command.armory.ShowArmoryTipCmd;
	import mvc.command.character.AddCharacterCancelCmd;
	import mvc.command.character.AddCharacterCmd;
	import mvc.command.character.AddCharacterFinishCmd;
	import mvc.command.character.CharactersRefreshedCmd;
	import mvc.command.character.NewDesignCharacterCmd;
	import mvc.command.character.RemoveCharacterCmd;
	import mvc.command.character.RemoveCharacterNoCmd;
	import mvc.command.character.RemoveCharacterYesCmd;
	import mvc.command.update.BackupUserDBCmd;
	import mvc.command.update.CheckUpdateCmd;

	public class MvcController extends FrontController
	{
		public function MvcController()
		{
			super();

			initializeCommands();
		}

		private function initializeCommands():void
		{
			super.addCommand(CharacterEvent.ADD_CHARACTER, AddCharacterCmd, false);
			super.addCommand(CharacterEvent.ADD_CHARACTER_CANCEL, AddCharacterCancelCmd, false);
			super.addCommand(CharacterEvent.ADD_CHARACTER_FINISH, AddCharacterFinishCmd, false);
			super.addCommand(CharacterEvent.REMOVE_CHARACTER, RemoveCharacterCmd, false);
			super.addCommand(CharacterEvent.REMOVE_CHARACTER_NO, RemoveCharacterNoCmd, false);
			super.addCommand(CharacterEvent.REMOVE_CHARACTER_YES, RemoveCharacterYesCmd, false);
			super.addCommand(CharacterEvent.NEW_DESIGN_CHARACTER, NewDesignCharacterCmd, false);
			super.addCommand(CharacterEvent.CHARACTERS_REFRESHED, CharactersRefreshedCmd, false);

			super.addCommand(ArmoryEvent.SEARCH_OPTIONAL_ITEM, SearchOptionalItemCmd, false);
			super.addCommand(ArmoryEvent.EQUIP_ALL_SLOTS, EquipAllSlotsCmd, false);
			super.addCommand(ArmoryEvent.EQUIP_ONE_SLOT, EquipOneSlotCmd, false);
			super.addCommand(ArmoryEvent.SHOW_ARMORY_TIP, ShowArmoryTipCmd, false);

			super.addCommand(AirUpdateEvent.BACKUP_USER_DB, BackupUserDBCmd, false);
			super.addCommand(AirUpdateEvent.CHECK_UPDATE, CheckUpdateCmd, false);

		}
	}
}